import Vue from 'vue'
import VueRouter from 'vue-router'

// 静态路由
import login from './staticModules/login'
import home from './staticModules/home'
import notFound from './staticModules/notFound'

// 动态路由
import department from './asyncModules/department'
import employee from './asyncModules/employee'

Vue.use(VueRouter)

const routes = [
  {
    path: '',
    redirect: '/login'
  },
  login,
  home,
  department,
  employee,
  notFound,
  {
    path: '*',
    redirect: '/404'
  }
]

const router = new VueRouter({
  routes
})

export default router
